/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stendcontrol;

/**
 *
 * @author minaev
 */
public class SclVal {
    public static double scale(long val,double coef0,double coef_prop){
        return (val - coef0)*coef_prop;
    }
    
    public static long descale(double val,double coef0,double coef_prop){
        return Math.round(val/coef_prop+coef0);
    }
}
